3.88 \(\int \frac{(d+e x)^2 (a+b \log (c x^n))^2}{x^2} \, dx\)

Optimal. Leaf size=133 \[ -\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac{2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac{2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2-2 a b e^2 n x-2 b^2 e^2 n x \log \left (c x^n\right )-\frac{2 b^2 d^2 n^2}{x}+2 b^2 e^2 n^2 x \]

[Out]

(-2*b^2*d^2*n^2)/x - 2*a*b*e^2*n*x + 2*b^2*e^2*n^2*x - 2*b^2*e^2*n*x*Log[c*x^n] - (2*b*d^2*n*(a + b*Log[c*x^n]
))/x - (d^2*(a + b*Log[c*x^n])^2)/x + e^2*x*(a + b*Log[c*x^n])^2 + (2*d*e*(a + b*Log[c*x^n])^3)/(3*b*n)

________________________________________________________________________________________

Rubi [A]  time = 0.172177, antiderivative size = 133, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {2353, 2296, 2295, 2305, 2304, 2302, 30} \[ -\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac{2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}+\frac{2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2-2 a b e^2 n x-2 b^2 e^2 n x \log \left (c x^n\right )-\frac{2 b^2 d^2 n^2}{x}+2 b^2 e^2 n^2 x \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x^2,x]

[Out]

(-2*b^2*d^2*n^2)/x - 2*a*b*e^2*n*x + 2*b^2*e^2*n^2*x - 2*b^2*e^2*n*x*Log[c*x^n] - (2*b*d^2*n*(a + b*Log[c*x^n]
))/x - (d^2*(a + b*Log[c*x^n])^2)/x + e^2*x*(a + b*Log[c*x^n])^2 + (2*d*e*(a + b*Log[c*x^n])^3)/(3*b*n)

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx &=\int \left (e^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2}+\frac{2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x}\right ) \, dx\\ &=d^2 \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx+(2 d e) \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx+e^2 \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=-\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2+\frac{(2 d e) \operatorname{Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}+\left (2 b d^2 n\right ) \int \frac{a+b \log \left (c x^n\right )}{x^2} \, dx-\left (2 b e^2 n\right ) \int \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-\frac{2 b^2 d^2 n^2}{x}-2 a b e^2 n x-\frac{2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2+\frac{2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\left (2 b^2 e^2 n\right ) \int \log \left (c x^n\right ) \, dx\\ &=-\frac{2 b^2 d^2 n^2}{x}-2 a b e^2 n x+2 b^2 e^2 n^2 x-2 b^2 e^2 n x \log \left (c x^n\right )-\frac{2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2+\frac{2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end{align*}

Mathematica [A]  time = 0.0389266, size = 107, normalized size = 0.8 \[ -\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac{2 b d^2 n \left (a+b \log \left (c x^n\right )+b n\right )}{x}+\frac{2 d e \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e^2 x \left (a+b \log \left (c x^n\right )\right )^2-2 b e^2 n x \left (a+b \log \left (c x^n\right )-b n\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x^2,x]

[Out]

-((d^2*(a + b*Log[c*x^n])^2)/x) + e^2*x*(a + b*Log[c*x^n])^2 + (2*d*e*(a + b*Log[c*x^n])^3)/(3*b*n) - 2*b*e^2*
n*x*(a - b*n + b*Log[c*x^n]) - (2*b*d^2*n*(a + b*n + b*Log[c*x^n]))/x

________________________________________________________________________________________

Maple [C]  time = 0.418, size = 2521, normalized size = 19. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*ln(c*x^n))^2/x^2,x)

[Out]

-b^2*(-2*d*e*x*ln(x)-e^2*x^2+d^2)/x*ln(x^n)^2-b*(I*Pi*b*d^2*csgn(I*c*x^n)^2*csgn(I*c)-I*Pi*b*d^2*csgn(I*x^n)*c
sgn(I*c*x^n)*csgn(I*c)-I*Pi*b*e^2*x^2*csgn(I*c*x^n)^2*csgn(I*c)-2*I*ln(x)*Pi*b*d*e*csgn(I*x^n)*csgn(I*c*x^n)^2
*x-I*Pi*b*d^2*csgn(I*c*x^n)^3-I*Pi*b*e^2*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2+2*I*ln(x)*Pi*b*d*e*csgn(I*x^n)*csgn(I
*c*x^n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*d*e*csgn(I*x^n)*csgn(I*c*x^
n)^2*x+24*I*ln(x)*Pi*a*b*d*e*csgn(I*c*x^n)^2*csgn(I*c)*x-3*Pi^2*b^2*e^2*x^2*csgn(I*x^n)^2*csgn(I*c*x^n)^4+6*Pi
^2*b^2*e^2*x^2*csgn(I*x^n)*csgn(I*c*x^n)^5+6*Pi^2*b^2*e^2*x^2*csgn(I*c*x^n)^5*csgn(I*c)-3*Pi^2*b^2*e^2*x^2*csg
n(I*c*x^n)^4*csgn(I*c)^2+3*Pi^2*b^2*d^2*csgn(I*c*x^n)^6+6*Pi^2*b^2*e^2*x^2*csgn(I*x^n)^2*csgn(I*c*x^n)^3*csgn(
I*c)-3*Pi^2*b^2*e^2*x^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2*csgn(I*c)^2-12*I*n*Pi*b^2*e^2*x^2*csgn(I*x^n)*csgn(I*c*x
^n)^2-12*I*n*Pi*b^2*e^2*x^2*csgn(I*c*x^n)^2*csgn(I*c)+12*I*Pi*b^2*d^2*n*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+12
*I*ln(c)*Pi*b^2*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+24*I*ln(x)*ln(c)*Pi*b^2*d*e*csgn(I*x^n)*csgn(I*c*x^n)^
2*x-24*n*ln(c)*b^2*e^2*x^2+24*ln(c)*a*b*e^2*x^2)/x

________________________________________________________________________________________

Maxima [A]  time = 1.18665, size = 270, normalized size = 2.03 \begin{align*} b^{2} e^{2} x \log \left (c x^{n}\right )^{2} - 2 \, a b e^{2} n x + 2 \, a b e^{2} x \log \left (c x^{n}\right ) + \frac{2 \, b^{2} d e \log \left (c x^{n}\right )^{3}}{3 \, n} + 2 \,{\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} e^{2} - 2 \, b^{2} d^{2}{\left (\frac{n^{2}}{x} + \frac{n \log \left (c x^{n}\right )}{x}\right )} + a^{2} e^{2} x + \frac{2 \, a b d e \log \left (c x^{n}\right )^{2}}{n} - \frac{b^{2} d^{2} \log \left (c x^{n}\right )^{2}}{x} + 2 \, a^{2} d e \log \left (x\right ) - \frac{2 \, a b d^{2} n}{x} - \frac{2 \, a b d^{2} \log \left (c x^{n}\right )}{x} - \frac{a^{2} d^{2}}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^2,x, algorithm="maxima")

[Out]

b^2*e^2*x*log(c*x^n)^2 - 2*a*b*e^2*n*x + 2*a*b*e^2*x*log(c*x^n) + 2/3*b^2*d*e*log(c*x^n)^3/n + 2*(n^2*x - n*x*
log(c*x^n))*b^2*e^2 - 2*b^2*d^2*(n^2/x + n*log(c*x^n)/x) + a^2*e^2*x + 2*a*b*d*e*log(c*x^n)^2/n - b^2*d^2*log(
c*x^n)^2/x + 2*a^2*d*e*log(x) - 2*a*b*d^2*n/x - 2*a*b*d^2*log(c*x^n)/x - a^2*d^2/x

________________________________________________________________________________________

Fricas [B]  time = 1.01888, size = 620, normalized size = 4.66 \begin{align*} \frac{2 \, b^{2} d e n^{2} x \log \left (x\right )^{3} - 6 \, b^{2} d^{2} n^{2} - 6 \, a b d^{2} n - 3 \, a^{2} d^{2} + 3 \,{\left (2 \, b^{2} e^{2} n^{2} - 2 \, a b e^{2} n + a^{2} e^{2}\right )} x^{2} + 3 \,{\left (b^{2} e^{2} x^{2} - b^{2} d^{2}\right )} \log \left (c\right )^{2} + 3 \,{\left (b^{2} e^{2} n^{2} x^{2} + 2 \, b^{2} d e n x \log \left (c\right ) - b^{2} d^{2} n^{2} + 2 \, a b d e n x\right )} \log \left (x\right )^{2} - 6 \,{\left (b^{2} d^{2} n + a b d^{2} +{\left (b^{2} e^{2} n - a b e^{2}\right )} x^{2}\right )} \log \left (c\right ) + 6 \,{\left (b^{2} d e x \log \left (c\right )^{2} - b^{2} d^{2} n^{2} - a b d^{2} n + a^{2} d e x -{\left (b^{2} e^{2} n^{2} - a b e^{2} n\right )} x^{2} +{\left (b^{2} e^{2} n x^{2} - b^{2} d^{2} n + 2 \, a b d e x\right )} \log \left (c\right )\right )} \log \left (x\right )}{3 \, x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^2,x, algorithm="fricas")

[Out]

1/3*(2*b^2*d*e*n^2*x*log(x)^3 - 6*b^2*d^2*n^2 - 6*a*b*d^2*n - 3*a^2*d^2 + 3*(2*b^2*e^2*n^2 - 2*a*b*e^2*n + a^2
*e^2)*x^2 + 3*(b^2*e^2*x^2 - b^2*d^2)*log(c)^2 + 3*(b^2*e^2*n^2*x^2 + 2*b^2*d*e*n*x*log(c) - b^2*d^2*n^2 + 2*a
*b*d*e*n*x)*log(x)^2 - 6*(b^2*d^2*n + a*b*d^2 + (b^2*e^2*n - a*b*e^2)*x^2)*log(c) + 6*(b^2*d*e*x*log(c)^2 - b^
2*d^2*n^2 - a*b*d^2*n + a^2*d*e*x - (b^2*e^2*n^2 - a*b*e^2*n)*x^2 + (b^2*e^2*n*x^2 - b^2*d^2*n + 2*a*b*d*e*x)*
log(c))*log(x))/x

________________________________________________________________________________________

Sympy [B]  time = 3.10351, size = 384, normalized size = 2.89 \begin{align*} - \frac{a^{2} d^{2}}{x} + 2 a^{2} d e \log{\left (x \right )} + a^{2} e^{2} x - \frac{2 a b d^{2} n \log{\left (x \right )}}{x} - \frac{2 a b d^{2} n}{x} - \frac{2 a b d^{2} \log{\left (c \right )}}{x} + 2 a b d e n \log{\left (x \right )}^{2} + 4 a b d e \log{\left (c \right )} \log{\left (x \right )} + 2 a b e^{2} n x \log{\left (x \right )} - 2 a b e^{2} n x + 2 a b e^{2} x \log{\left (c \right )} - \frac{b^{2} d^{2} n^{2} \log{\left (x \right )}^{2}}{x} - \frac{2 b^{2} d^{2} n^{2} \log{\left (x \right )}}{x} - \frac{2 b^{2} d^{2} n^{2}}{x} - \frac{2 b^{2} d^{2} n \log{\left (c \right )} \log{\left (x \right )}}{x} - \frac{2 b^{2} d^{2} n \log{\left (c \right )}}{x} - \frac{b^{2} d^{2} \log{\left (c \right )}^{2}}{x} + \frac{2 b^{2} d e n^{2} \log{\left (x \right )}^{3}}{3} + 2 b^{2} d e n \log{\left (c \right )} \log{\left (x \right )}^{2} + 2 b^{2} d e \log{\left (c \right )}^{2} \log{\left (x \right )} + b^{2} e^{2} n^{2} x \log{\left (x \right )}^{2} - 2 b^{2} e^{2} n^{2} x \log{\left (x \right )} + 2 b^{2} e^{2} n^{2} x + 2 b^{2} e^{2} n x \log{\left (c \right )} \log{\left (x \right )} - 2 b^{2} e^{2} n x \log{\left (c \right )} + b^{2} e^{2} x \log{\left (c \right )}^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))**2/x**2,x)

[Out]

-a**2*d**2/x + 2*a**2*d*e*log(x) + a**2*e**2*x - 2*a*b*d**2*n*log(x)/x - 2*a*b*d**2*n/x - 2*a*b*d**2*log(c)/x
+ 2*a*b*d*e*n*log(x)**2 + 4*a*b*d*e*log(c)*log(x) + 2*a*b*e**2*n*x*log(x) - 2*a*b*e**2*n*x + 2*a*b*e**2*x*log(
c) - b**2*d**2*n**2*log(x)**2/x - 2*b**2*d**2*n**2*log(x)/x - 2*b**2*d**2*n**2/x - 2*b**2*d**2*n*log(c)*log(x)
/x - 2*b**2*d**2*n*log(c)/x - b**2*d**2*log(c)**2/x + 2*b**2*d*e*n**2*log(x)**3/3 + 2*b**2*d*e*n*log(c)*log(x)
**2 + 2*b**2*d*e*log(c)**2*log(x) + b**2*e**2*n**2*x*log(x)**2 - 2*b**2*e**2*n**2*x*log(x) + 2*b**2*e**2*n**2*
x + 2*b**2*e**2*n*x*log(c)*log(x) - 2*b**2*e**2*n*x*log(c) + b**2*e**2*x*log(c)**2

________________________________________________________________________________________

Giac [B]  time = 1.27369, size = 444, normalized size = 3.34 \begin{align*} \frac{2 \, b^{2} d n^{2} x e \log \left (x\right )^{3} + 3 \, b^{2} n^{2} x^{2} e^{2} \log \left (x\right )^{2} + 6 \, b^{2} d n x e \log \left (c\right ) \log \left (x\right )^{2} - 6 \, b^{2} n^{2} x^{2} e^{2} \log \left (x\right ) + 6 \, b^{2} n x^{2} e^{2} \log \left (c\right ) \log \left (x\right ) + 6 \, b^{2} d x e \log \left (c\right )^{2} \log \left (x\right ) - 3 \, b^{2} d^{2} n^{2} \log \left (x\right )^{2} + 6 \, a b d n x e \log \left (x\right )^{2} + 6 \, b^{2} n^{2} x^{2} e^{2} - 6 \, b^{2} n x^{2} e^{2} \log \left (c\right ) + 3 \, b^{2} x^{2} e^{2} \log \left (c\right )^{2} - 6 \, b^{2} d^{2} n^{2} \log \left (x\right ) + 6 \, a b n x^{2} e^{2} \log \left (x\right ) - 6 \, b^{2} d^{2} n \log \left (c\right ) \log \left (x\right ) + 12 \, a b d x e \log \left (c\right ) \log \left (x\right ) - 6 \, b^{2} d^{2} n^{2} - 6 \, a b n x^{2} e^{2} - 6 \, b^{2} d^{2} n \log \left (c\right ) + 6 \, a b x^{2} e^{2} \log \left (c\right ) - 3 \, b^{2} d^{2} \log \left (c\right )^{2} - 6 \, a b d^{2} n \log \left (x\right ) + 6 \, a^{2} d x e \log \left (x\right ) - 6 \, a b d^{2} n + 3 \, a^{2} x^{2} e^{2} - 6 \, a b d^{2} \log \left (c\right ) - 3 \, a^{2} d^{2}}{3 \, x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^2,x, algorithm="giac")

[Out]

1/3*(2*b^2*d*n^2*x*e*log(x)^3 + 3*b^2*n^2*x^2*e^2*log(x)^2 + 6*b^2*d*n*x*e*log(c)*log(x)^2 - 6*b^2*n^2*x^2*e^2
*log(x) + 6*b^2*n*x^2*e^2*log(c)*log(x) + 6*b^2*d*x*e*log(c)^2*log(x) - 3*b^2*d^2*n^2*log(x)^2 + 6*a*b*d*n*x*e
*log(x)^2 + 6*b^2*n^2*x^2*e^2 - 6*b^2*n*x^2*e^2*log(c) + 3*b^2*x^2*e^2*log(c)^2 - 6*b^2*d^2*n^2*log(x) + 6*a*b
*n*x^2*e^2*log(x) - 6*b^2*d^2*n*log(c)*log(x) + 12*a*b*d*x*e*log(c)*log(x) - 6*b^2*d^2*n^2 - 6*a*b*n*x^2*e^2 -
 6*b^2*d^2*n*log(c) + 6*a*b*x^2*e^2*log(c) - 3*b^2*d^2*log(c)^2 - 6*a*b*d^2*n*log(x) + 6*a^2*d*x*e*log(x) - 6*
a*b*d^2*n + 3*a^2*x^2*e^2 - 6*a*b*d^2*log(c) - 3*a^2*d^2)/x